package cn.dgut.training.controller;

import cn.dgut.training.annotation.LoginUser;
import cn.dgut.training.dto.transaction.OrdersDTO;
import cn.dgut.training.entity.transaction.GroupJoin;
import cn.dgut.training.vo.BaseVO;
import cn.dgut.training.vo.CommonResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;

@FeignClient(value = "shop-transaction")
public interface TransactionService {

    //根据活动id查询参与表
    @GetMapping("/group-join/findGroupJoin")
    public CommonResponse findGroupJoinByActivityId(@RequestParam("activityId") Long activityId);

    //更改团购订单状态
    @PostMapping("/order/updateGroupOrder")
    public CommonResponse updateGroupOrderStatus(@RequestParam("orderId") Long orderId);

    //根据用户id查询参与表
    @GetMapping("/group-join/findGroupUser")
    public CommonResponse findGroupJoinByUserId(@RequestParam("userId") Long userId);

}
